function x = nchk(n,k)

x = 1;

for i = 0:k-1
    x = x*((n-i)/(i+1));
end;

end